package cn.kpi.service.zhfx.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.kpi.dao.zhfx.ZhfxDao;
import cn.kpi.entity.sys.UserEntity;
import cn.kpi.entity.zhfx.WorkassGroupEntity;
import cn.kpi.entity.zhfx.WorkassTempEntity;
import cn.kpi.service.zhfx.IZhfxService;

@Service
public class ZhfxServiceImpl implements IZhfxService {
	@Autowired
	private ZhfxDao zhfxDao;
	
	public List<UserEntity> GetUserListByWhere( String where)throws Exception{
		try{
			return zhfxDao.GetUserListByWhere(where);
		}
		catch(Exception ex){
			ex.printStackTrace();
			return null;
		}
	}
	
	public List<Map> GetZfkhList(String where,int year,int month)throws Exception{
		try{
			return zhfxDao.GetZfkhList(where,year,month);
		}
		catch(Exception ex){
			ex.printStackTrace();
			return null;
		}
	}


	public List<Map> GetZfkhTemplateList(String where,Long templateid)throws Exception{
		try{
			return zhfxDao.GetZfkhTemplateList(where,templateid);
		}
		catch(Exception ex){
			ex.printStackTrace();
			return null;
		}
	}

	
	 public List<Map> GetDwkhList(String where,int year,int month,int quarter,int divisor,int orgparentid)throws Exception{
		 try{
				return zhfxDao.GetDwkhList(where,year,month,quarter,divisor,orgparentid);
			}
			catch(Exception ex){
				ex.printStackTrace();
				return null;
			}
	 }

	public List<Map> GetDwkhdataList(String where,int year,int month,int orgparentid)throws Exception{
		try{
			return zhfxDao.GetDwkhdataList(where,year,month,orgparentid);
		}
		catch(Exception ex){
			ex.printStackTrace();
			return null;
		}
	}
	 
	 public List<WorkassTempEntity> GetWorkassTempList()throws Exception{
		 try{
				return zhfxDao.GetWorkassTempList();
			}
			catch(Exception ex){
				ex.printStackTrace();
				return null;
			}
	 }
	 
	 public List<WorkassGroupEntity> GetWorkassGroupList()throws Exception{
		 try{
				return zhfxDao.GetWorkassGroupList();
			}
			catch(Exception ex){
				ex.printStackTrace();
				return null;
			}
	 }
	 
	 public List<Map> GetYwkhList(String where,int year,int month)throws Exception{
		 try{
				return zhfxDao.GetYwkhList(where,year,month);
			}
			catch(Exception ex){
				ex.printStackTrace();
				return null;
			}
	 }
	 public List<Map> GetWorkassGroupMap()throws Exception{
		 try{
				return zhfxDao.GetWorkassGroupMap();
			}
			catch(Exception ex){
				ex.printStackTrace();
				return null;
			}
	 }
	 public List<Map> GetYwkhMonthListByOrgId(String where,int year)throws Exception{
		 try{
				return zhfxDao.GetYwkhMonthListByOrgId(where,year);
			}
			catch(Exception ex){
				ex.printStackTrace();
				return null;
			}
	 }

	public List<Map> GetYwYearListByOrgId(String tempid,String orgid) throws Exception{
		try {
			return zhfxDao.GetYwYearListByOrgId(tempid,orgid);
		} catch (Exception ex) {
			ex.printStackTrace();
			return null;
		}
	}

	public List<Map> GetZfYearListByOrgId(String orgid) throws Exception{
		try {
			return zhfxDao.GetZfYearListByOrgId(orgid);
		} catch (Exception ex) {
			ex.printStackTrace();
			return null;
		}
	}
	public List<Map> GetDwYearListByOrgId(String orgid) throws Exception{
		try {
			return zhfxDao.GetDwYearListByOrgId(orgid);
		} catch (Exception ex) {
			ex.printStackTrace();
			return null;
		}
	}
}
